<!DOCTYPE html>
<html  xmlns:https="http://www.w3.org/1999/xhtml"
       xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="all,follow">

    <title>产品管理</title>
    <link rel="shortcut icon" href="img/favicon.ico">

    <!-- global stylesheets -->
    <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/font-icon-style.css">
    <link rel="stylesheet" href="/css/style.default.css" id="theme-stylesheet">
    <script type="text/javascript">
        function(){
            $(".search-input").on("input propertychange", function() {
                var queryStr = $.trim($(".search-input").val());
                if(queryStr === ''){
                    $(".list-content li").show();
                }else{
                    // 以下是匹配某些列的内容，如果是匹配全部列的话就把find()和.parent()去掉即可
                    $(".list-content li").hide().find(".code, .name").filter(":contains('"+queryStr+"')").parent("li").show();
                    //$(".list-content").refresh(); //重新刷新列表把隐藏的dom结构去掉。
                }
            });
        }
    </script>
    <!-- Core stylesheets -->
</head>

<body>
<!--====================================================
                        PAGE CONTENT
======================================================-->
<div class="content-inner form-cont">
    <div class="row">
        <div class="col-md-12">

            <!--***** BASIC FORM *****-->
            <div class="card form" id="form1">
                <div class="card-header">
                    <h3>产品查询</h3>
                </div>
                <br>
                <form>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="example-text-input" style="width: 85px;" class=" col-form-label">产品名称</label>
                                <div class="col-9">
                                    <input class="form-control" type="text" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label style="width: 85px;"  class=" col-form-label">产品类型</label>
                                <div class="col-9">
                                    <select class="form-control">
                                        <option value="">选择类型</option>
                                        <option value="">aa</option>
                                        <option value="">bb</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label style="width: 85px;"  class=" col-form-label">状态</label>
                                <div class="col-9">
                                    <select class="form-control">
                                        <option value="">选择状态</option>
                                        <option value="">暂无</option>
                                        <option value=""></option>
                                    </select>
                                </div>
                            </div>
                            <button type="submit" class="btn btn-general btn-blue mr-2">查询</button>
                            <button type="reset" class="btn btn-general btn-white">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="page-content d-flex align-items-stretch">
        <div class="content-inner chart-cont">
            <!--***** CONTENT *****-->
            <div class="row">
                <button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#newProduct">新增产品</button>
                <table class="table table-hover">
                    <thead>
                    <tr class="bg-info text-white">
                        <th>#</th>
                        <th>产品名称</th>
                        <th>产品类型</th>
                        <th>价格(元)</th>
                        <th>创建时间</th>
                        <th>状态</th>
                        <th style="text-align: center;">操作</th>
                    </tr>
                    </thead>
                    <tbody id="table-detail">
                    <tr th:each="product:${products}" th:if="${product}">
                        <th scope="row" th:text="${productStat.count}">1</th>
                        <td th:text="${product.productName}">合同生成</td>
                        <td th:text="${product.productType}">合同生产</td>
                        <td th:text="${product.price}">1350.00</td>
                        <td th:text="${product.createTime}">2019-12-24 00:00:00</td>
                        <td th:text="${product.status}">上线</td>
                        <td>
                            <!--<a href="#" data-toggle="modal" data-target="#newProduct">新增|</a>-->
                            <a href="#" data-toggle="modal" data-target="#updateProduct">修改|</a>
                            <a th:href="@{/product/delete/{id}(id=${product.id})}">删除</a>
                        </td>

                        <!-- 修改产品模态框（Modal） -->
                        <div class="modal fade" id="updateProduct" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                            &times;
                                        </button>
                                        <h4 class="modal-title" id="myModalLabel">
                                            修改合同
                                        </h4>
                                    </div>
                                    <div class="modal-body">
                                        <form th:action="/product/update" method="post">
                                            <input type="hidden" th:value="${productStat.count}" name="id"/>
                                            <div class="form-group row">
                                                <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品名称：</label>
                                                <div class="col-9">
                                                    <input  class="form-control" type="text" value="" th:value="${product.productName}" name="productName">
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label">产品类型：</label>
                                                <div class="col-9">
                                                    <select class="form-control" name="productType">
                                                        <option value="">选择类型</option>
                                                        <option value="公司服务">公司服务</option>
                                                        <option value="合同服务">合同服务</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 费用：</label>
                                                <div class="col-9">
                                                    <input  class="form-control" type="text" value="" th:value="${product.price}" name="price">
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 更新时间：</label>
                                                <div class="col-9">
                                                    <!--<input  class="form-control" type="text" value="" th:value="${product.updateTime}" name="updateTime">-->
                                                    <input name="createTime" class="form-control" type="datetime-local" value="yyyy-mm-dd 00:00" th:value="${product.updateTime}">
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 修改人：</label>
                                                <div class="col-9">
                                                    <input  class="form-control" type="text" value="" th:value="${product.updateBy}" name="updateBy">
                                                </div>
                                            </div>
                                            <div class="form-group row">
                                                <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品描述：</label>
                                                <div class="col-9">
                                                    <textarea class="form-control" rows="5" th:text="${product.description}" name="description"></textarea>
                                                </div>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="submit" class="btn btn-primary">提交</button>
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                                </button>
                                            </div>
                                        </form>
                                    </div><!-- /.modal-content -->
                                </div><!-- /.modal -->
                            </div>
                        </div>
                    </tr>
                    </tbody>
                </table>
                <div  class="c-pages">
                    <div class="cp-item">
                        <span>共</span>
                        <span id="cp-count">0</span>
                        <span>条</span>
                    </div>
                    <div class="cp-item">
                        <span id="curr-page">1</span>
                        <span>/</span>
                        <span id="total-page">1</span>
                    </div>
                    <div class="cp-item">
                        <button id="home" class="btn btn-outline-primary">首页</button>
                        <button id="prev" class="btn btn-outline-primary">上页</button>
                        <input type="number" id="goToPage" />
                        <button id="goTo" class="btn btn-outline-primary">转到</button>
                        <button id="next" class="btn btn-outline-primary">下页</button>
                        <button id="last" class="btn btn-outline-primary">尾页</button>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="newProduct" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    新增合同
                </h4>
            </div>
            <div class="modal-body">
                <form action="/product/add" method="post">
                    <div class="form-group row">
                        <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品名称：</label>
                        <div class="col-9">
                            <input  class="form-control" type="text" value="" name="productName">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label">产品类型：</label>
                        <div class="col-9">
                            <select name="productType" class="form-control">
                                <option value="选择类型">选择类型</option>
                                <option value="公司服务">公司服务</option>
                                <option value="合同服务">合同服务</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 费用：</label>
                        <div class="col-9">
                            <input  class="form-control" type="text" value="" name="price">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 创建时间：</label>
                        <div class="col-9">
                            <input name="createTime" class="form-control" type="datetime-local" value="yyyy-mm-dd 00:00">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 创建人：</label>
                        <div class="col-9">
                            <input  class="form-control" type="text" value="" name="createBy">
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品描述：</label>
                        <div class="col-9">
                            <textarea class="form-control" rows="5" name="description"></textarea>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="submit" class="btn btn-primary">提交</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>
<!-- 新增产品模态框（Modal） -->
<!--<div class="modal fade" id="newProduct" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">-->
<!--<div class="modal-dialog">-->
<!--<div class="modal-content">-->
<!--<div class="modal-header">-->
<!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">-->
<!--&times;-->
<!--</button>-->
<!--<h4 class="modal-title" id="myModalLabel">-->
<!--新增合同-->
<!--</h4>-->
<!--</div>-->
<!--<div class="modal-body">-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品名称：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label">产品类型：</label>-->
<!--<div class="col-9">-->
<!--<select class="form-control">-->
<!--<option value="">选择类型</option>-->
<!--<option value="">aa</option>-->
<!--<option value="">bb</option>-->
<!--</select>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 费用：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 创建时间：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 创建人：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品描述：</label>-->
<!--<div class="col-9">-->
<!--<textarea class="form-control" rows="5"></textarea>-->
<!--</div>-->
<!--</div>-->
<!--<div class="modal-footer">-->
<!--<button type="submit" class="btn btn-primary">提交</button>-->
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭-->
<!--</button>-->
<!--</div>-->
<!--</div>&lt;!&ndash; /.modal-content &ndash;&gt;-->
<!--</div>&lt;!&ndash; /.modal &ndash;&gt;-->
<!--</div>-->
<!--</div>-->
<!--&lt;!&ndash; 修改产品模态框（Modal） &ndash;&gt;-->
<!--<div class="modal fade" id="updateProduct" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">-->
<!--<div class="modal-dialog">-->
<!--<div class="modal-content">-->
<!--<div class="modal-header">-->
<!--<button type="button" class="close" data-dismiss="modal" aria-hidden="true">-->
<!--&times;-->
<!--</button>-->
<!--<h4 class="modal-title" id="myModalLabel">-->
<!--修改合同-->
<!--</h4>-->
<!--</div>-->
<!--<div class="modal-body">-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品名称：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label">产品类型：</label>-->
<!--<div class="col-9">-->
<!--<select class="form-control">-->
<!--<option value="">选择类型</option>-->
<!--<option value="">aa</option>-->
<!--<option value="">bb</option>-->
<!--</select>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 费用：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 更新时间：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 修改人：</label>-->
<!--<div class="col-9">-->
<!--<input  class="form-control" type="text" value="">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group row">-->
<!--<label for="example-text-input" style="width: 85px;margin-left: 20px;" class=" col-form-label"> 产品描述：</label>-->
<!--<div class="col-9">-->
<!--<textarea class="form-control" rows="5"></textarea>-->
<!--</div>-->
<!--</div>-->
<!--<div class="modal-footer">-->
<!--<button type="submit" class="btn btn-primary">提交</button>-->
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭-->
<!--</button>-->
<!--</div>-->
<!--</div>&lt;!&ndash; /.modal-content &ndash;&gt;-->
<!--</div>&lt;!&ndash; /.modal &ndash;&gt;-->
<!--</div>-->
<!--</div>-->
<!--Global Javascript -->
<script src="/js/jquery.min.js"></script>
<script src="/js/popper/popper.min.js"></script>
<script src="/js/tether.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery.cookie.js"></script>
<script src="/js/jquery.validate.min.js"></script>
<script src="/js/chart.min.js"></script>
<script src="/js/front.js"></script>
<script src="/js/forpage.js"></script>
</body>

</html>